<?php
function mydebug($var)
{
	echo '<pre>';
	print_r($var);
	echo '</pre>';
}

function showmsg($msg,$returl){
$html = <<<BOT
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>牛X后台管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Le styles -->
    <link href="/themes/admin/assets//css/bootstrap.css" rel="stylesheet">
	<link href="/themes/admin/assets//css/bootstrap-responsive.css" rel="stylesheet">
	<link href="/themes/admin/assets//css/custom.css" rel="stylesheet">	
  </head>
<body>
	<div class="container-fluid main-box">
	<div class="row-fluid">
			<div class="box span12">
				<div class="box-header well">
					<h2><i class="icon-info-sign"></i>提示</h2>					
				</div>
				<div class="box-content">
					<div class="span12">
					     <div class="alert alert-block alert-success fade in">
							<button data-dismiss="alert" class="close" type="button">×</button>
							<h4 class="alert-heading">{$msg}</h4>
							<p><span style="color:#f60;" id="seconds">3</span>秒后自动返回<a id="url" href="{$returl}">如果您的浏览器没有自动跳转，请点击这里！ </a></p>
							<p>
							  <a href="{$returl}" class="btn btn-success">跳转</a> <a href="history.go(-1)" class="btn">返回</a>
							</p>
						</div>
						<script type="text/javascript">
							var i = 2;
							var reTime = setInterval(function(){
								i = i-1;
								if(i<0){
									
									window.location.href= '{$returl}'
									window.clearInterval(reTime);
									return;
									
								}
								document.getElementById("seconds").innerHTML = i;
							},1000);
						
						</script> 							
					</div>					
					<div class="clearfix"></div>
				</div>
			</div>
	  </div>
	</div>
	
	<script src="/themes/admin/assets//js/jquery.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-transition.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-alert.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-modal.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-dropdown.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-scrollspy.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-tab.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-tooltip.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-popover.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-button.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-collapse.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-carousel.js"></script>
	<script src="/themes/admin/assets//js/bootstrap-typeahead.js"></script>
</body>
</html>
BOT;
cflush($html);
exit;
}

	/**
     * 即时输出提示信息
     *
     * @return
     */
function cflush($msg)
{
	    echo $msg;
	    ob_flush();
        flush();
}